Security News
Combatting Alert Fatigue by Prioritizing Malicious Intent
In 2023, data breaches surged 78% from zero-day and supply chain attacks, but developers are still buried under alerts that are unable to prevent these threats.
remark-preset-lint-recommended
Advanced tools
remark preset to configure remark-lint with rules that prevent mistakes or syntaxes that do not work correctly across vendors
The remark-preset-lint-recommended package is a preset configuration for remark-lint, a tool used to lint Markdown files. It includes a set of recommended rules to ensure consistent and error-free Markdown content.
Linting for Markdown
This configuration file sets up remark-lint with the recommended preset. It ensures that your Markdown files adhere to a set of best practices and common standards.
module.exports = {
"plugins": [
["remark-lint", [
require("remark-preset-lint-recommended")
]]
]
};
Integration with remark
This code demonstrates how to integrate the recommended linting rules directly into a remark processing pipeline. It processes a Markdown string and applies the linting rules.
const remark = require('remark');
const recommended = require('remark-preset-lint-recommended');
remark()
.use(recommended)
.process('# Hello world!', function (err, file) {
if (err) throw err;
console.log(String(file));
});
remark-lint is the core linter for Markdown files. It provides the base functionality for linting and can be extended with various plugins, including remark-preset-lint-recommended. It is more flexible but requires manual configuration of rules.
remark-preset-lint-consistent is another preset for remark-lint that focuses on consistent Markdown formatting. It includes a different set of rules compared to remark-preset-lint-recommended, aimed at ensuring uniformity in Markdown files.
remark-preset-lint-markdown-style-guide is a preset that enforces the rules defined by the Markdown style guide. It is more opinionated and comprehensive compared to remark-preset-lint-recommended, making it suitable for projects that follow the style guide strictly.
remark preset to configure remark-lint
with settings that prevent
mistakes or syntaxes that do not work correctly across vendors.
This preset configures remark-lint
with the following rules:
npm:
npm install remark-preset-lint-recommended
You probably want to use it on the CLI through a config file:
…
"remarkConfig": {
+ "plugins": ["preset-lint-recommended"]
}
…
Or use it on the CLI directly
remark -u preset-lint-recommended readme.md
Or use this on the API:
var remark = require('remark')
var report = require('vfile-reporter')
remark()
+ .use(require('remark-preset-lint-recommended'))
.process('_Emphasis_ and **importance**', function (err, file) {
console.error(report(err || file))
})
See contributing.md
in remarkjs/.github
for ways
to get started.
See support.md
for ways to get help.
This project has a code of conduct. By interacting with this repository, organization, or community you agree to abide by its terms.
FAQs
remark preset to configure remark-lint with rules that prevent mistakes or stuff that fails across vendors.
The npm package remark-preset-lint-recommended receives a total of 70,837 weekly downloads. As such, remark-preset-lint-recommended popularity was classified as popular.
We found that remark-preset-lint-recommended demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
In 2023, data breaches surged 78% from zero-day and supply chain attacks, but developers are still buried under alerts that are unable to prevent these threats.
Security News
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
Security News
License exceptions modify the terms of open source licenses, impacting how software can be used, modified, and distributed. Developers should be aware of the legal implications of these exceptions.